<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-09-06 00:34:26
 * @LastEditTime: 2020-03-02 21:39:10
 * @LastEditors: Please set LastEditors
 -->
<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../css/vant.css">
    <link rel="stylesheet" type="text/css" href="../css/base.css" />
    <script type="text/javascript" src="../script/jquery.js"></script>
    <script type="text/javascript" src="../script/layer/mobile/layer.js"></script>
    <script type="text/javascript" src="../script/vue.min.js"></script>
    <script type="text/javascript" src="../script/vant.min.js"></script>
    <script type="text/javascript" src="../script/fastclick.js"></script>
    <script type="text/javascript" src="../script/base.js"></script>
    <style type="text/css">
        .van-cell__value {
            text-align: right;
        }

        .user-img {
            width: 50px;
            height: 50px;
            border-radius: 25px;
            overflow: hidden;
            display: inline-block;
        }

        .user-img img {
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="init-full">
            <van-nav-bar class="head" title="活动专题" left-arrow @click-left="onClickLeft">
            </van-nav-bar>
            <div class="body-no-bottom">
                <div class="content">

                </div>
                <van-loading v-if="showLoading" />
            </div>
        </div>
    </div>
</body>

<script type="text/javascript">
    var vm;
    apiready = function () {
        // $('.init-full').show();

        api.addEventListener({
            name: 'keyback'
        }, function (ret, err) {
            vm.onClickLeft();
        });

        var browser = api.require('webBrowser');
        var url = api.pageParam.url;
        vm = new Vue({
            el: '#app',
            data: {
                showLoading: false
            },
            created: function () {
                var that = this;
                var appTop_ = api.safeArea.top;
                var y = appTop_ ? (appTop_ + 40) : (appTop_ + 25);
                browser.openView({
                    url: url,
                    rect: {
                        x: 0,
                        y: y,
                        w: 'auto',
                        h: 'auto'
                    }
                }, function (ret, err) {

                });
            },
            methods: {
                onClickLeft() {
                    browser.historyBack(
                        function (ret, err) {
                            if (!ret.status) {
                                api.closeWin();
                            }
                        }
                    );
                }
            }
        })
    };
</script>

</html>